package com.education.service;
import org.apache.commons.fileupload.ProgressListener;

public class UploadListener implements ProgressListener {

    private UploadStatus status;

    //构造方法
    public UploadListener(UploadStatus status) {
        super();
        this.status = status;
    }

    //重新方法
    public void update(long bytesRead, long contentLength, int items) {
        status.setBytesRead(bytesRead);
        status.setContentLength(contentLength);
        status.setItems(items);
    }

}
